<template>
	<view class="record-my">
		<view v-if="list.length" class="all">
			<view v-for="(item,index) in list" >
				<text>{{$fomartDate(item.createtime)}}</text>
				<text>抽中了{{item.goods_info.title}}</text>
			</view>
		</view>
		<view v-else class="center" style="padding-top: 100rpx;">
			<image src="/static/img/no_content.png" mode="widthFix"  style="width: 60%;"></image>
			<view class="fs-12 " style="color:#999;">没有中奖记录哦~</view>
		</view>
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				page:1,limit:10,
				list:[]
			}
		},
		methods: {
			getlotteryMy(){
				this.$get(this.$api.lotteryMy,{
					page:this.page,limit:10
				},(res)=>{
					let {data}=res;
					if(data.code==1){
						this.list=this.list.concat(data.data.data)
					}
				})
			}
		},
		onLoad() {
			this.getlotteryMy()
		},
		onReachBottom() {
			this.page++;
				this.getlotteryMy()
		}
	}
</script>

<style lang="scss" scoped>
.record-my {background: white;height: 100vh;}
.my-record .all {
	padding:0rpx 30rpx;
	
}
.record-my .all>view {display: flex;justify-content: space-between;border-bottom: 1px solid #eee;padding:20rpx 0;margin: 0 20rpx;}
</style>
